package com.ztgf.order.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.order.models.bo.OrderReturnCommodityAdminBO;
import com.ztgf.order.models.bo.OrderReturnCommodityListBO;
import com.ztgf.order.models.bo.OrderReturnCommodityRelationBO;
import com.ztgf.order.models.dto.OrderReturnCommodityDTO;
import com.ztgf.order.models.vo.OrderAfterSaleLogMsgVO;
import com.ztgf.order.models.vo.OrderReturnCommodityAdminListVO;
import com.ztgf.order.models.vo.OrderReturnCommodityDetailsVO;
import com.ztgf.order.models.vo.OrderReturnCommodityListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * author: chenyu.wang
 * date: 2020-06-30 10:32
 * Description:订单退换货表映射
 */
@Mapper
public interface OrderReturnCommodityMapper extends BaseMapper<OrderReturnCommodityDTO> {

    List<OrderReturnCommodityRelationBO> selectOrderReturnInfo(Long orderId);

    /**
     * description: 个人中心我的售后列表
     * param: [page, bo]
     * author: chenyu.wang
     * date: 2020-06-30
     * return: java.util.List<com.ztgf.order.models.vo.OrderReturnCommodityListVO>
     */
    List<OrderReturnCommodityListVO> queryPageList(Page<OrderReturnCommodityListVO> page, @Param("item") OrderReturnCommodityListBO bo);

    /**
     * description: 查询售后订单退换货详情
     * param: [id]
     * author: chenyu.wang
     * date: 2020-06-30
     * return: com.ztgf.order.models.vo.OrderReturnCommodityDetailsVO
     */
    OrderReturnCommodityDetailsVO getDetailsById(@Param("id") Long id);

    /**
     * description: 后台管理系统售后订单列表
     * param: [page, bo]
     * author: chenyu.wang
     * date: 2020-06-30
     * return: java.util.List<com.ztgf.order.models.vo.OrderReturnCommodityAdminListVO>
     */
    List<OrderReturnCommodityAdminListVO> queryAdminPageList(Page<OrderReturnCommodityAdminListVO> page, @Param("item") OrderReturnCommodityAdminBO bo);

    /**
     * description: 统计售后中的订单数量
     * param: []
     * author: chenyu.wang
     * date: 2020-06-30
     * return: java.lang.Integer
     */
    Integer getAfterSaleNumber();

    /**
     * description: 统计未处理的投诉与建议数量
     * param: []
     * author: chenyu.wang
     * date: 2020-06-30
     * return: java.lang.Integer
     */
    Integer getComplaintsNumber();

    /*
     * @description:查询售后订单日志
     * @author: chenyu.wang
     * @date: 2020-09-04
     */
    List<OrderAfterSaleLogMsgVO> queryAfterOrderLog(@Param("orderId") Long orderId);
}
